package com.test.ll;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.PageFactory;


public class CreateOrder {

	public static void main(String[] args) {
		WebDriver driver = (WebDriver) new FirefoxDriver();
		driver.get("http://172.16.30.12:9999/omsweb/signin.html");
		WebElement element1 = driver.findElement(By.name("username"));
		element1.sendKeys("4px123");
		//element1.submit();
		WebElement element2 = driver.findElement(By.name("password"));
		element2.sendKeys("123456");
		//element2.submit();
		WebElement loginButton = driver.findElement(By.id("btnLogin"));
		try {
		Thread.sleep(5000);
		} catch (InterruptedException e) {
		e.printStackTrace();
		
		}
		
		System.out.println("Page title is: " + driver.getTitle());
		//driver.quit();
		loginButton.click();
		

		try {
			Thread.sleep(5000);
			} 
		catch (InterruptedException e) {
			e.printStackTrace();
			
			}

		}
		

}


